<template>
  <el-container>
    <el-main style="height: 100%">
      <router-view></router-view>
    </el-main>
    <el-footer>
      <el-tabs tab-position="bottom" :stretch="true" @tab-click="toPath">
        <el-tab-pane :label="t.label" v-for="t in tabs" :key="t.label"></el-tab-pane>
      </el-tabs>
    </el-footer>
  </el-container>
</template>

<script>
import router from "@/router/router";

export default {
  name: "StudentPlatform",
  data() {
    return {
      tabs: [{
        path: '/home',
        label: '主页'
      }, {
        path: '/home/learning',
        label: '学习'
      }, {
        path: '/home/studentSpace',
        label: '个人空间'
      }
      ]
    }
  },
  methods: {
    toPath(label) {
      router.push(this.tabs[label.index].path)
    }
  }
}
</script>

<style scoped>
.el-main{
}
</style>